.\"	$OpenBSD: nvram.4,v 1.2 2013/10/15 20:34:47 jmc Exp $
.\"
.\" Copyright (c) 2013 Miodrag Vallat.
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: October 15 2013 $
.Dt NVRAM 4 aviion
.Os
.Sh NAME
.Nm nvram
.Nd Mostek MK48T0x battery-backed realtime clock
.Sh SYNOPSIS
.Cd "nvram0  at syscon0 offset 0x80000"
.Sh DESCRIPTION
The
.Nm
driver provides support for the
Mostek MK48T02 realtime clock chip.
.Pp
In addition to the clock itself, this chip embeds 2KB
of battery-backed memory, which is accessible through the special
.Pa /dev/nvram0
file.
.Sh FILES
.Bl -tag -width Pa -compact
.It Pa /dev/nvram0
.El
.Sh SEE ALSO
.Xr intro 4 ,
.Xr syscon 4
.Sh CAVEATS
The last 8 bytes of the battery-backed memory contains the realtime clock
registers.
Writing to these locations will interfere with proper clock operation.
.Pp
Most, if not all, of the battery-backed memory is used by DG/UX to store
some of its configuration data, and may be reinitialized by the PROM
if it considers the memory contents as invalid.
The
.Nm
driver does not prevent access to this reserved part.
